package HotelsData;
 
/**
 *
 * @author Zainab MAAMAR
 */
import java.io.File;
import java.io.IOException;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;

import javax.xml.bind.Unmarshaller;

 
public class JAXBXMLHandler {
 
  
 
    // Import: Unmarshalling
    public static Hotels unmarshal(File importFile) throws JAXBException {
    	Hotels hotel = null;
        JAXBContext context;
 
        context = JAXBContext.newInstance(Hotels.class);
        Unmarshaller um = context.createUnmarshaller();
        hotel = (Hotels) um.unmarshal(importFile);
 
        return hotel;
    }
}